package com.tqz.event;

/**
 * <p>
 *
 * @author tianqingzhao
 * @since 2021/6/8 16:38
 */
public class Test {

    public static void main(String[] args) {
        //注册A事件的监听
        EventManager.addListener(new UserListener());

        //发布A事件
        EventManager.publishEvent(new UserEvent("用户事件"));
        System.out.println("111111111111");

        EventManager.addListener(new DogListener());
        DogEvent addDog = new DogEvent("addDog");
        DogEvent updateDog = new DogEvent("updateDog");

        EventManager.publishEvent(addDog);
        EventManager.publishEvent(updateDog);

    }
}
